<template>
    <iframe ref="iframe" src="http://127.0.0.1:5173/baidu?mode=view" class="iframe_box" frameborder="0" scrolling="yes" name="iframe" seamless></iframe>
</template>

<script setup>
import {onMounted , ref} from "vue"

const iframe = ref()


onMounted(()=>{

    iframe.value.contentWindow.postMessage('hello','http://127.0.0.1:5173')

})


</script>

<style lang='less' scoped>
.iframe_box{
    width: 100%;
    height: 100%;
}

</style>
